home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Lib / test / test_gdbm.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2000-06-23  |  844 b   |  32 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 1.5)
  3.  
  4. '''Test script for the gdbm module
  5.    Roger E. Masse
  6. '''
  7. import gdbm
  8. error
  9. verbose
  10. g['a'] = 'b'
  11. g['12345678910'] = '019237410982340912840198242'
  12. if verbose:
  13.     print 'Test gdbm file keys: ', a
  14.  
  15. g.has_key('a')
  16. g.close()
  17. g = gdbm.open(filename, 'r')
  18. g.close()
  19. g = gdbm.open(filename, 'rw')
  20. g.close()
  21. g = gdbm.open(filename, 'w')
  22. g.close()
  23. g = gdbm.open(filename, 'n')
  24. g.close()
  25.  
  26. try:
  27.     import os
  28.     os.unlink(filename)
  29. except:
  30.     pass
  31.  
  32.